1. Field of the Invention
The present invention is directed in general to flash memories and methods for operating same. In one aspect, the present invention relates to a system and method of using flash memory to emulate Electrically Erasable Programmable Read Only Memory (EEPROM).
2. Description of the Related Art
Electrically erasable, programmable, read-only memory (EEPROM) is a type of non-volatile memory (NVM) used with microcontrollers, microprocessors, computers and other electronic devices (such as automotive embedded controllers) to store data. EEPROM is typically characterized by the ability to erase and write individual bytes of memory many times over, with programmed locations retaining their data over an extended period when the power supply is removed. However, because of the increased cost and size requirements and manufacturing difficulties for EEPROM memories, some devices emulate EEPROM memory using a portion of a sector or block of erasable flash memory to mirror information stored in a RAM, so that the stored information is maintained in flash memory when the device is not powered. However, there continue to be challenges with overcoming flash memory cycling and reliability that that can adversely affect the integrity of emulated EEPROM data stored in the flash array, such as when power is unstable (referred to as “brownouts”) and asynchronous resets at the device can cause corruption of the mirrored information at the flash memory. In addition, flash memory latent defects may result in a flash operation failure for a sector after extensive program and erase cycles prevent a program or erase error from being resolved, in which case the “dead” sector is declared as invalid and is dropped from the operational flow. While sector identification schemes for EEPROM emulation have been proposed to use status bits interleaved with sector erasure operations to enable the determination of start, stop and sector status within a system, these schemes have been found to have weaknesses during update steps and do not provide the ability to track dead sectors in the flash memory.